import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p005 from './p005';

export default async function a003(fd: IFeidaoAiBrowserComponent) {// 依据责任部门下拉框渲染责任人下拉框数据
	// todo
	console.log('zj-000004:a003----start');
	// 获取责任部门下拉框中的数据编号
	const n = fd.data.node.querySelector<HTMLSelectElement>('[data-id="safety_department_name"]');
	const v = n.value;
	// 依据编号查询数据
	const res = await nodejs<Array<{}>>('wyf-hManager/zj-000004/s002', { safety_department_no: v });
	console.log(res);
	// 渲染隐患源评价级别下拉框数据
	render(fd, res, p005, 'p005', 'inner');

	console.log('zj-000004:a003----end');
}
